knitr::opts_chunk$set(
echo = FALSE,
message = FALSE,
warning = FALSE,
error = FALSE,
collapse = TRUE,
comment = "",
fig.height = 8,
fig.width = 12,
fig.align = "center",
cache = FALSE
)
html output file, and also the Rmd file.I love a sunburnt country
A land of sweeping plains
Of ragged mountain ranges
Of droughts and flooding rains
(From the poem My Country by Dorothea MacKellar)
In this last week there have been many news stories about an ongoing dry period in large parts of Australia. In the west of NSW, large parts of Queensland, and even the Gippsland region of Victoria it is reported that there has been insufficient rain for many months and this is severely affecting many farmers. This assignment is designed to examine what is happening using publicly available data.
This is what I have done to get the data to this point. The Global Historical Climate Network maintained by NOAA curates weather records for stations across the globe.
You can get the list of stations and their latitude and longitude from the ghcnd-stations.txt file from the raw files site https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/. Australian stations have “ASN” prefixing the station id. There are 17219 recording stations across Australia. Some of them are on Antartica, remote islands, and possibly on Naval ships because the locations of these few are far from the mainland.
The data is stored in a single file for each station. The Australian Bureau of Meteorolgy links to this site for Australian data, and you can download station by station from their site, but this is a very inefficient interface. We can get multiple files read by scripting it in R. (You could pay BOM to download your preferred summaries.) I pulled weather data from stations around Victoria as a first pass, and checked the precipitation of the most recent records. It was clear quickly that a lot of stations have not had their data updated recently on this database. So I needed a way to get just the data from stations that had measurements for this year, all the way through to August. The web page with the list of files available for all stations has a “modified date” for each file, so I extracted this information and used it to select only stations in Australia that had data modified this month.
The next step is to go file by file, and pull the data for these stations, combine it into a single data file. This is the same as what we did for the Melbourne weather station during a past class.
Your don’t need to repeat what I have done. Start by reading in the data that is already created.
Various possibilities here
(1pt) Read in the raw data and put it into tidy form. The code is provided, with a few spots where you need to fill in the functions. Where you see ??? in the code, is where you need to fill in to make it work.
(1pt) Compute the monthly precipitation for each year. (You need to sum up the precipitation for each month, for each year.) When working with precipitation it is important to summarise using totals. This is different from working with temperature, where we would typically summarise using means. Why should you use totals to summarise precipitation?
It is the cumulative precipitation that matters for the environment. This leads to moist ground water for plants to drink, and for accumulation of water in rivers and dams for animals and agriculture to use.
The first few months saw a lot of rain at a few locations. There was less rain in recent months. It is not clear if this is the usual pattern across these stations for the first 7 months of the year.
Need to show the code for this question.
\[Relative~change~ = \frac{T_{2018}-T_{longterm}}{T_{longterm}}\]
(While you have this map, make it interactive with plotly, so that the station id pops up on mouseover. Find a station in the west of NSW or southwest of Qld, or even in Gippsland. Keep the id for this station for the next question.)
Code should be shown, also would be good to see an explanation of how it was calculated and why they chose their station.
The code below computes the number of years that had rainfall in that month less than 2018, and then turns this into a fraction. This is the percentile. I did some rough calculations to find the location where there was low rainfall over the seven months of each year.
There will be various answers here. It would be nice to see some writing about the historical drought that was identified.
The code below focuses on one of the stations from above, in south-west Queensland, and finds that 1965 has the lowest rainfall in the years of the data, and lower than this year. A little googling on 1965 drought brings up the wikipedia page with information about the drought.
# A tibble: 68 x 2
year s
<int> <dbl>
1 1965 67.5
2 2018 96.8
3 1972 108.
4 1993 115.
5 1992 118.
6 1985 121
7 2017 140.
8 1964 141.
9 1970 169.
10 2013 172.
# ... with 58 more rows
The 1965 drought in Eastern Australia is described on wikipedia
2 points for clean code, nicely organised report and well written explanations.
Points for the assignment will be based on: